package org.jboss.soa.esb.samples.quickstart.webserviceproducer.webservice;

//import javax.jws.Oneway;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import org.jboss.soa.esb.actions.soap.SOAPProcessor;
import org.jboss.soa.esb.message.Message;


@WebService(name = "WSServicio1", targetNamespace="http://webservice_producer/wsservicio1")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class WSServicio1 {


    @WebMethod
    public String reenviarSOAP(@WebParam(name="message") String message) {
    	System.out.println("PROCESANDO WS en Servicio1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        Message esbMessage = SOAPProcessor.getMessage();
        if(esbMessage != null) {
            //System.out.println("**** SOAPRequest Head: \n" + esbMessage.getHeader());
            System.out.println("**** SOAPRequest Body: \n" + esbMessage.getBody().get());
            // System.out.println("\n" + esbMessage.toString() + "\n");
        }
        return message;
    }
    
}
